home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Business Master (3rd Edition)
/
The Business Master (3rd Edition).iso
/
files
/
grap_cad
/
dicogo
/
cmdmak.lsp
next >
Wrap
Lisp/Scheme
|
1991-09-30
|
1KB
|
43 lines
; CMDMAK.LSP
; This function will create a DICOGO command file, prompting
; for the necessary data.
;
;
; Copyright (c) 1991, D I Management Corporation
;
;
;
;
;
(prompt "\nLoading . . . .\n")
(defun c:cmdmak (/ tset fil cfil cmd arg)
(setq pfx (getvar "dwgprefix"))
(prompt "\nEnter command file name -- no extension.")
(setq fil (getstring "\n(Data will be appended to exist. file:) "))
(setq cfl (strcat pfx fil ".cmd"))
(setq datafile (open cfl "a"))
(setq tset nil)
(setq cmd (getstring T "\nEnter a command: "))
(while (/= 0 (strlen cmd))
(prompt "\nEnter parameters: ")
(setq tset (ssget))
(if (/= tset nil)
(progn
(setq len (sslength tset))
(setq c 0)
(while (< c len)
(progn
(setq arg (cdr (assoc 1 (setq e (entget (ssname tset c))))))
(setq cmd (strcat cmd " " arg))
(setq c (+ 1 c))
)
)
(setq tset nil)
)
)
(write-line cmd datafile)
(setq cmd (getstring T "\Enter a command: "))
)
(close datafile)
(princ))